package per.poker.gonghua;

import cn.hutool.core.bean.BeanUtil;
import javafx.fxml.FXML;

public class GonghuaController extends GonghuaData {

    private final GonghuaService service = new GonghuaService();

    @FXML
    public void initialize() {
        BeanUtil.copyProperties(this, service);
        PokerGen.genNewCard();
        service.showCard(PokerGen.distributeCard());
        service.initButton();
        new Thread(() -> {
            try {
                service.startGame();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }).start();
    }
}
